\hypertarget{class_game_app_viewer}{
\section{GameAppViewer Class Reference}
\label{class_game_app_viewer}\index{GameAppViewer@{GameAppViewer}}
}


Extended QmlApplicationViewer containing {\ttfamily \hyperlink{class_game_settings}{GameSettings}}, {\ttfamily \hyperlink{class_game_widget}{GameWidget}} and {\ttfamily \hyperlink{class_music_player}{MusicPlayer}} instance and takes care of starting the music playback {\ttfamily \hyperlink{class_game_app_viewer_a97c126a98f0b481bd865ba8088a64459}{GameAppViewer::startMusic()}}.  


\subsection*{Public Slots}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{class_game_app_viewer_a7746584dffdb01095c07be5b461584ea}{leaveGameMode} ()
\begin{DoxyCompactList}\small\item\em Leaves the game mode. \item\end{DoxyCompactList}\item 
void \hyperlink{class_game_app_viewer_a5e7d56d94e2031c70d10506d851a328a}{enterPauseMode} ()
\begin{DoxyCompactList}\small\item\em Enters the pause mode. \item\end{DoxyCompactList}\item 
void \hyperlink{class_game_app_viewer_ab9621ba8d40558ba5f3e9d42045801ef}{leavePauseMode} ()
\begin{DoxyCompactList}\small\item\em Leaves the pause mode. \item\end{DoxyCompactList}\item 
void \hyperlink{class_game_app_viewer_aa16c10219b100fdffe0ac4eb5c3ae72d}{gameOverMode} (int, FPtype)
\begin{DoxyCompactList}\small\item\em Enters the game over mode. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{class_game_app_viewer_a6b26ba92eb9c0fcd9627798274cf0959}{
\hyperlink{class_game_app_viewer_a6b26ba92eb9c0fcd9627798274cf0959}{GameAppViewer} (QWidget $\ast$parent=0)}
\label{class_game_app_viewer_a6b26ba92eb9c0fcd9627798274cf0959}

\begin{DoxyCompactList}\small\item\em Constructs \hyperlink{class_game_app_viewer}{GameAppViewer}. \item\end{DoxyCompactList}\item 
\hypertarget{class_game_app_viewer_ad17802d567cd26f25a65f845c36cca05}{
virtual \hyperlink{class_game_app_viewer_ad17802d567cd26f25a65f845c36cca05}{$\sim$GameAppViewer} ()}
\label{class_game_app_viewer_ad17802d567cd26f25a65f845c36cca05}

\begin{DoxyCompactList}\small\item\em Destructs \hyperlink{class_game_app_viewer}{GameAppViewer}. \item\end{DoxyCompactList}\item 
\hypertarget{class_game_app_viewer_a35897cfe8734f9218fe4b849f9f226e7}{
\hyperlink{class_game_widget}{GameWidget} $\ast$ \hyperlink{class_game_app_viewer_a35897cfe8734f9218fe4b849f9f226e7}{initGameWidget} ()}
\label{class_game_app_viewer_a35897cfe8734f9218fe4b849f9f226e7}

\begin{DoxyCompactList}\small\item\em Initializes \hyperlink{class_game_widget}{GameWidget}. \item\end{DoxyCompactList}\item 
\hypertarget{class_game_app_viewer_a14da3eb43ad9291c557af1fd14cbdc59}{
\hyperlink{class_game_settings}{GameSettings} $\ast$ \hyperlink{class_game_app_viewer_a14da3eb43ad9291c557af1fd14cbdc59}{getSettings} ()}
\label{class_game_app_viewer_a14da3eb43ad9291c557af1fd14cbdc59}

\begin{DoxyCompactList}\small\item\em Getter for \hyperlink{class_game_settings}{GameSettings} instance. \item\end{DoxyCompactList}\item 
\hypertarget{class_game_app_viewer_aafd5b0dfd0195f41f21db4e6c1dbb426}{
\hyperlink{class_sound_engine}{SoundEngine} $\ast$ \hyperlink{class_game_app_viewer_aafd5b0dfd0195f41f21db4e6c1dbb426}{getSoundEngine} ()}
\label{class_game_app_viewer_aafd5b0dfd0195f41f21db4e6c1dbb426}

\begin{DoxyCompactList}\small\item\em Getter for \hyperlink{class_sound_engine}{SoundEngine} instance. \item\end{DoxyCompactList}\item 
\hypertarget{class_game_app_viewer_a629a58aa9f63a6733589e8f75c54692a}{
Q\_\-INVOKABLE void \hyperlink{class_game_app_viewer_a629a58aa9f63a6733589e8f75c54692a}{getTitleHeight} ()}
\label{class_game_app_viewer_a629a58aa9f63a6733589e8f75c54692a}

\begin{DoxyCompactList}\small\item\em Gets the height of the QML window title. \item\end{DoxyCompactList}\item 
\hypertarget{class_game_app_viewer_a97c126a98f0b481bd865ba8088a64459}{
void \hyperlink{class_game_app_viewer_a97c126a98f0b481bd865ba8088a64459}{startMusic} ()}
\label{class_game_app_viewer_a97c126a98f0b481bd865ba8088a64459}

\begin{DoxyCompactList}\small\item\em Start playing the game background music. \item\end{DoxyCompactList}\item 
Q\_\-INVOKABLE void \hyperlink{class_game_app_viewer_a3fc5d6aeb8849e629817aba636659f12}{enterGameMode} ()
\begin{DoxyCompactList}\small\item\em Enters the game mode. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{class_game_app_viewer_a19fdbf064eff7008f946803b270ecfeb}{
void \hyperlink{class_game_app_viewer_a19fdbf064eff7008f946803b270ecfeb}{resizeEvent} (QResizeEvent $\ast$)}
\label{class_game_app_viewer_a19fdbf064eff7008f946803b270ecfeb}

\begin{DoxyCompactList}\small\item\em Slot for resize events from QML framework. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Slots}
\begin{DoxyCompactItemize}
\item 
\hypertarget{class_game_app_viewer_a594bd18dd7485dc493606110cb0766a3}{
void \hyperlink{class_game_app_viewer_a594bd18dd7485dc493606110cb0766a3}{callEvent} (const QDBusMessage \&)}
\label{class_game_app_viewer_a594bd18dd7485dc493606110cb0766a3}

\begin{DoxyCompactList}\small\item\em Slot for incoming phone call events from DBus. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{class_game_app_viewer_a8fd8af022aa4d0857ea0f8a1fb159355}{
int \hyperlink{class_game_app_viewer_a8fd8af022aa4d0857ea0f8a1fb159355}{lastWidth}}
\label{class_game_app_viewer_a8fd8af022aa4d0857ea0f8a1fb159355}

\begin{DoxyCompactList}\small\item\em Recent width of the view. \item\end{DoxyCompactList}\item 
\hypertarget{class_game_app_viewer_acdc9887511ffede0f8754750beaae272}{
int \hyperlink{class_game_app_viewer_acdc9887511ffede0f8754750beaae272}{lastHeight}}
\label{class_game_app_viewer_acdc9887511ffede0f8754750beaae272}

\begin{DoxyCompactList}\small\item\em Recent height of the view. \item\end{DoxyCompactList}\item 
\hypertarget{class_game_app_viewer_a01cf61c59404220a9158c357cb2b720d}{
\hyperlink{class_game_settings}{GameSettings} $\ast$ \hyperlink{class_game_app_viewer_a01cf61c59404220a9158c357cb2b720d}{settings}}
\label{class_game_app_viewer_a01cf61c59404220a9158c357cb2b720d}

\begin{DoxyCompactList}\small\item\em Game settings. \item\end{DoxyCompactList}\item 
\hypertarget{class_game_app_viewer_a88de37a9497eb32325c4cd20ef1390d3}{
\hyperlink{class_game_widget}{GameWidget} $\ast$ \hyperlink{class_game_app_viewer_a88de37a9497eb32325c4cd20ef1390d3}{gameWidget}}
\label{class_game_app_viewer_a88de37a9497eb32325c4cd20ef1390d3}

\begin{DoxyCompactList}\small\item\em OpenGL game widget. \item\end{DoxyCompactList}\item 
\hypertarget{class_game_app_viewer_af8fb0b657e5d4785ec9ef1282a263faf}{
QTimer $\ast$ \hyperlink{class_game_app_viewer_af8fb0b657e5d4785ec9ef1282a263faf}{timer}}
\label{class_game_app_viewer_af8fb0b657e5d4785ec9ef1282a263faf}

\begin{DoxyCompactList}\small\item\em Game mainloop timer. \item\end{DoxyCompactList}\item 
\hypertarget{class_game_app_viewer_ad45c73d615e40e0e0271434a75d7de86}{
QSystemScreenSaver $\ast$ \hyperlink{class_game_app_viewer_ad45c73d615e40e0e0271434a75d7de86}{systemScreenSaver}}
\label{class_game_app_viewer_ad45c73d615e40e0e0271434a75d7de86}

\begin{DoxyCompactList}\small\item\em Used to disable screensaver when playing the game. \item\end{DoxyCompactList}\item 
\hypertarget{class_game_app_viewer_abfef133465e02f62aab51816dee7ff33}{
\hyperlink{class_music_player}{MusicPlayer} $\ast$ \hyperlink{class_game_app_viewer_abfef133465e02f62aab51816dee7ff33}{musicPlayer}}
\label{class_game_app_viewer_abfef133465e02f62aab51816dee7ff33}

\begin{DoxyCompactList}\small\item\em Plays game background music. \item\end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Extended QmlApplicationViewer containing {\ttfamily \hyperlink{class_game_settings}{GameSettings}}, {\ttfamily \hyperlink{class_game_widget}{GameWidget}} and {\ttfamily \hyperlink{class_music_player}{MusicPlayer}} instance and takes care of starting the music playback {\ttfamily \hyperlink{class_game_app_viewer_a97c126a98f0b481bd865ba8088a64459}{GameAppViewer::startMusic()}}. {\ttfamily \hyperlink{class_game_app_viewer}{GameAppViewer}} extends {\ttfamily QmlApplicationViewer} class, which is automatically maintained by Qt Creator. That's how we will leave the {\ttfamily QmlApplicationViewer} class intact. 

\subsection{Member Function Documentation}
\hypertarget{class_game_app_viewer_a3fc5d6aeb8849e629817aba636659f12}{
\index{GameAppViewer@{GameAppViewer}!enterGameMode@{enterGameMode}}
\index{enterGameMode@{enterGameMode}!GameAppViewer@{GameAppViewer}}
\subsubsection[{enterGameMode}]{\setlength{\rightskip}{0pt plus 5cm}void GameAppViewer::enterGameMode (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{class_game_app_viewer_a3fc5d6aeb8849e629817aba636659f12}


Enters the game mode. 

From QML view to OpenGL view. \hypertarget{class_game_app_viewer_a5e7d56d94e2031c70d10506d851a328a}{
\index{GameAppViewer@{GameAppViewer}!enterPauseMode@{enterPauseMode}}
\index{enterPauseMode@{enterPauseMode}!GameAppViewer@{GameAppViewer}}
\subsubsection[{enterPauseMode}]{\setlength{\rightskip}{0pt plus 5cm}void GameAppViewer::enterPauseMode (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}slot\mbox{]}}}}
\label{class_game_app_viewer_a5e7d56d94e2031c70d10506d851a328a}


Enters the pause mode. 

Stays at OpenGL view. \hypertarget{class_game_app_viewer_aa16c10219b100fdffe0ac4eb5c3ae72d}{
\index{GameAppViewer@{GameAppViewer}!gameOverMode@{gameOverMode}}
\index{gameOverMode@{gameOverMode}!GameAppViewer@{GameAppViewer}}
\subsubsection[{gameOverMode}]{\setlength{\rightskip}{0pt plus 5cm}void GameAppViewer::gameOverMode (
\begin{DoxyParamCaption}
\item[{int}]{ score, }
\item[{FPtype}]{ gametime}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}slot\mbox{]}}}}
\label{class_game_app_viewer_aa16c10219b100fdffe0ac4eb5c3ae72d}


Enters the game over mode. 

From OpenGL view to QML view. \hypertarget{class_game_app_viewer_a7746584dffdb01095c07be5b461584ea}{
\index{GameAppViewer@{GameAppViewer}!leaveGameMode@{leaveGameMode}}
\index{leaveGameMode@{leaveGameMode}!GameAppViewer@{GameAppViewer}}
\subsubsection[{leaveGameMode}]{\setlength{\rightskip}{0pt plus 5cm}void GameAppViewer::leaveGameMode (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}slot\mbox{]}}}}
\label{class_game_app_viewer_a7746584dffdb01095c07be5b461584ea}


Leaves the game mode. 

From OpenGL view to QML view. \hypertarget{class_game_app_viewer_ab9621ba8d40558ba5f3e9d42045801ef}{
\index{GameAppViewer@{GameAppViewer}!leavePauseMode@{leavePauseMode}}
\index{leavePauseMode@{leavePauseMode}!GameAppViewer@{GameAppViewer}}
\subsubsection[{leavePauseMode}]{\setlength{\rightskip}{0pt plus 5cm}void GameAppViewer::leavePauseMode (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}slot\mbox{]}}}}
\label{class_game_app_viewer_ab9621ba8d40558ba5f3e9d42045801ef}


Leaves the pause mode. 

Enters the OpenGL view. 

The documentation for this class was generated from the following files:\begin{DoxyCompactItemize}
\item 
gameappviewer.h\item 
gameappviewer.cpp\end{DoxyCompactItemize}
